package com.yuan.system.api.factory;

import com.yuan.system.api.client.RemoteUserClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;


@Component
public class RemoteMemberFallbackFactory implements FallbackFactory<RemoteUserClient> {
    private static final Logger log = LoggerFactory.getLogger(RemoteMemberFallbackFactory.class);
    @Override
    public RemoteUserClient create(Throwable cause) {


        return phone -> {
            log.error("获取用户失败:{}", cause.getMessage());
            return null;
        };
    }
}
